package com.easymin.weixin.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ApiLogsCriteria {
  protected String orderByClause;

  protected boolean distinct;

  protected List<Criteria> oredCriteria;

  public ApiLogsCriteria() {
    oredCriteria = new ArrayList<Criteria>();
  }

  public void setOrderByClause(String orderByClause) {
    this.orderByClause = orderByClause;
  }

  public String getOrderByClause() {
    return orderByClause;
  }

  public void setDistinct(boolean distinct) {
    this.distinct = distinct;
  }

  public boolean isDistinct() {
    return distinct;
  }

  public List<Criteria> getOredCriteria() {
    return oredCriteria;
  }

  public void or(Criteria criteria) {
    oredCriteria.add(criteria);
  }
  
  /**
   * 拼接查询条件.
   */
  
  public Criteria or() {
    Criteria criteria = createCriteriaInternal();
    oredCriteria.add(criteria);
    return criteria;
  }
  /**
   * 拼接查询条件.
   */
  
  public Criteria createCriteria() {
    Criteria criteria = createCriteriaInternal();
    if (oredCriteria.size() == 0) {
      oredCriteria.add(criteria);
    }
    return criteria;
  }

  protected Criteria createCriteriaInternal() {
    Criteria criteria = new Criteria();
    return criteria;
  }
  /**
   * 拼接查询条件.
   */
  
  public void clear() {
    oredCriteria.clear();
    orderByClause = null;
    distinct = false;
  }

  protected abstract static class GeneratedCriteria {
    protected List<Criterion> criteria;

    protected GeneratedCriteria() {
      super();
      criteria = new ArrayList<Criterion>();
    }

    public boolean isValid() {
      return criteria.size() > 0;
    }

    public List<Criterion> getAllCriteria() {
      return criteria;
    }

    public List<Criterion> getCriteria() {
      return criteria;
    }

    protected void addCriterion(String condition) {
      if (condition == null) {
        throw new RuntimeException("Value for condition cannot be null");
      }
      criteria.add(new Criterion(condition));
    }

    protected void addCriterion(String condition, Object value, String property) {
      if (value == null) {
        throw new RuntimeException("Value for " + property + " cannot be null");
      }
      criteria.add(new Criterion(condition, value));
    }

    protected void addCriterion(String condition, Object value1, Object value2, String property) {
      if (value1 == null || value2 == null) {
        throw new RuntimeException("Between values for " + property + " cannot be null");
      }
      criteria.add(new Criterion(condition, value1, value2));
    }

    public Criteria andIdIsNull() {
      addCriterion("id is null");
      return (Criteria) this;
    }

    public Criteria andIdIsNotNull() {
      addCriterion("id is not null");
      return (Criteria) this;
    }

    public Criteria andIdEqualTo(Long value) {
      addCriterion("id =", value, "id");
      return (Criteria) this;
    }

    public Criteria andIdNotEqualTo(Long value) {
      addCriterion("id <>", value, "id");
      return (Criteria) this;
    }

    public Criteria andIdGreaterThan(Long value) {
      addCriterion("id >", value, "id");
      return (Criteria) this;
    }

    public Criteria andIdGreaterThanOrEqualTo(Long value) {
      addCriterion("id >=", value, "id");
      return (Criteria) this;
    }

    public Criteria andIdLessThan(Long value) {
      addCriterion("id <", value, "id");
      return (Criteria) this;
    }

    public Criteria andIdLessThanOrEqualTo(Long value) {
      addCriterion("id <=", value, "id");
      return (Criteria) this;
    }

    public Criteria andIdIn(List<Long> values) {
      addCriterion("id in", values, "id");
      return (Criteria) this;
    }

    public Criteria andIdNotIn(List<Long> values) {
      addCriterion("id not in", values, "id");
      return (Criteria) this;
    }

    public Criteria andIdBetween(Long value1, Long value2) {
      addCriterion("id between", value1, value2, "id");
      return (Criteria) this;
    }

    public Criteria andIdNotBetween(Long value1, Long value2) {
      addCriterion("id not between", value1, value2, "id");
      return (Criteria) this;
    }

    public Criteria andAppKeyIsNull() {
      addCriterion("appKey is null");
      return (Criteria) this;
    }

    public Criteria andAppKeyIsNotNull() {
      addCriterion("appKey is not null");
      return (Criteria) this;
    }

    public Criteria andAppKeyEqualTo(String value) {
      addCriterion("appKey =", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyNotEqualTo(String value) {
      addCriterion("appKey <>", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyGreaterThan(String value) {
      addCriterion("appKey >", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyGreaterThanOrEqualTo(String value) {
      addCriterion("appKey >=", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyLessThan(String value) {
      addCriterion("appKey <", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyLessThanOrEqualTo(String value) {
      addCriterion("appKey <=", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyLike(String value) {
      addCriterion("appKey like", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyNotLike(String value) {
      addCriterion("appKey not like", value, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyIn(List<String> values) {
      addCriterion("appKey in", values, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyNotIn(List<String> values) {
      addCriterion("appKey not in", values, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyBetween(String value1, String value2) {
      addCriterion("appKey between", value1, value2, "appKey");
      return (Criteria) this;
    }

    public Criteria andAppKeyNotBetween(String value1, String value2) {
      addCriterion("appKey not between", value1, value2, "appKey");
      return (Criteria) this;
    }

    public Criteria andUriIsNull() {
      addCriterion("uri is null");
      return (Criteria) this;
    }

    public Criteria andUriIsNotNull() {
      addCriterion("uri is not null");
      return (Criteria) this;
    }

    public Criteria andUriEqualTo(String value) {
      addCriterion("uri =", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriNotEqualTo(String value) {
      addCriterion("uri <>", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriGreaterThan(String value) {
      addCriterion("uri >", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriGreaterThanOrEqualTo(String value) {
      addCriterion("uri >=", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriLessThan(String value) {
      addCriterion("uri <", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriLessThanOrEqualTo(String value) {
      addCriterion("uri <=", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriLike(String value) {
      addCriterion("uri like", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriNotLike(String value) {
      addCriterion("uri not like", value, "uri");
      return (Criteria) this;
    }

    public Criteria andUriIn(List<String> values) {
      addCriterion("uri in", values, "uri");
      return (Criteria) this;
    }

    public Criteria andUriNotIn(List<String> values) {
      addCriterion("uri not in", values, "uri");
      return (Criteria) this;
    }

    public Criteria andUriBetween(String value1, String value2) {
      addCriterion("uri between", value1, value2, "uri");
      return (Criteria) this;
    }

    public Criteria andUriNotBetween(String value1, String value2) {
      addCriterion("uri not between", value1, value2, "uri");
      return (Criteria) this;
    }

    public Criteria andIpIsNull() {
      addCriterion("ip is null");
      return (Criteria) this;
    }

    public Criteria andIpIsNotNull() {
      addCriterion("ip is not null");
      return (Criteria) this;
    }

    public Criteria andIpEqualTo(String value) {
      addCriterion("ip =", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpNotEqualTo(String value) {
      addCriterion("ip <>", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpGreaterThan(String value) {
      addCriterion("ip >", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpGreaterThanOrEqualTo(String value) {
      addCriterion("ip >=", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpLessThan(String value) {
      addCriterion("ip <", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpLessThanOrEqualTo(String value) {
      addCriterion("ip <=", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpLike(String value) {
      addCriterion("ip like", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpNotLike(String value) {
      addCriterion("ip not like", value, "ip");
      return (Criteria) this;
    }

    public Criteria andIpIn(List<String> values) {
      addCriterion("ip in", values, "ip");
      return (Criteria) this;
    }

    public Criteria andIpNotIn(List<String> values) {
      addCriterion("ip not in", values, "ip");
      return (Criteria) this;
    }

    public Criteria andIpBetween(String value1, String value2) {
      addCriterion("ip between", value1, value2, "ip");
      return (Criteria) this;
    }

    public Criteria andIpNotBetween(String value1, String value2) {
      addCriterion("ip not between", value1, value2, "ip");
      return (Criteria) this;
    }

    public Criteria andResultIsNull() {
      addCriterion("result is null");
      return (Criteria) this;
    }

    public Criteria andResultIsNotNull() {
      addCriterion("result is not null");
      return (Criteria) this;
    }

    public Criteria andResultEqualTo(Boolean value) {
      addCriterion("result =", value, "result");
      return (Criteria) this;
    }

    public Criteria andResultNotEqualTo(Boolean value) {
      addCriterion("result <>", value, "result");
      return (Criteria) this;
    }

    public Criteria andResultGreaterThan(Boolean value) {
      addCriterion("result >", value, "result");
      return (Criteria) this;
    }

    public Criteria andResultGreaterThanOrEqualTo(Boolean value) {
      addCriterion("result >=", value, "result");
      return (Criteria) this;
    }

    public Criteria andResultLessThan(Boolean value) {
      addCriterion("result <", value, "result");
      return (Criteria) this;
    }

    public Criteria andResultLessThanOrEqualTo(Boolean value) {
      addCriterion("result <=", value, "result");
      return (Criteria) this;
    }

    public Criteria andResultIn(List<Boolean> values) {
      addCriterion("result in", values, "result");
      return (Criteria) this;
    }

    public Criteria andResultNotIn(List<Boolean> values) {
      addCriterion("result not in", values, "result");
      return (Criteria) this;
    }

    public Criteria andResultBetween(Boolean value1, Boolean value2) {
      addCriterion("result between", value1, value2, "result");
      return (Criteria) this;
    }

    public Criteria andResultNotBetween(Boolean value1, Boolean value2) {
      addCriterion("result not between", value1, value2, "result");
      return (Criteria) this;
    }

    public Criteria andHttpMethodIsNull() {
      addCriterion("httpMethod is null");
      return (Criteria) this;
    }

    public Criteria andHttpMethodIsNotNull() {
      addCriterion("httpMethod is not null");
      return (Criteria) this;
    }

    public Criteria andHttpMethodEqualTo(String value) {
      addCriterion("httpMethod =", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodNotEqualTo(String value) {
      addCriterion("httpMethod <>", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodGreaterThan(String value) {
      addCriterion("httpMethod >", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodGreaterThanOrEqualTo(String value) {
      addCriterion("httpMethod >=", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodLessThan(String value) {
      addCriterion("httpMethod <", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodLessThanOrEqualTo(String value) {
      addCriterion("httpMethod <=", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodLike(String value) {
      addCriterion("httpMethod like", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodNotLike(String value) {
      addCriterion("httpMethod not like", value, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodIn(List<String> values) {
      addCriterion("httpMethod in", values, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodNotIn(List<String> values) {
      addCriterion("httpMethod not in", values, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodBetween(String value1, String value2) {
      addCriterion("httpMethod between", value1, value2, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andHttpMethodNotBetween(String value1, String value2) {
      addCriterion("httpMethod not between", value1, value2, "httpMethod");
      return (Criteria) this;
    }

    public Criteria andNanoTimeIsNull() {
      addCriterion("nanoTime is null");
      return (Criteria) this;
    }

    public Criteria andNanoTimeIsNotNull() {
      addCriterion("nanoTime is not null");
      return (Criteria) this;
    }

    public Criteria andNanoTimeEqualTo(Long value) {
      addCriterion("nanoTime =", value, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeNotEqualTo(Long value) {
      addCriterion("nanoTime <>", value, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeGreaterThan(Long value) {
      addCriterion("nanoTime >", value, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeGreaterThanOrEqualTo(Long value) {
      addCriterion("nanoTime >=", value, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeLessThan(Long value) {
      addCriterion("nanoTime <", value, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeLessThanOrEqualTo(Long value) {
      addCriterion("nanoTime <=", value, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeIn(List<Long> values) {
      addCriterion("nanoTime in", values, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeNotIn(List<Long> values) {
      addCriterion("nanoTime not in", values, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeBetween(Long value1, Long value2) {
      addCriterion("nanoTime between", value1, value2, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andNanoTimeNotBetween(Long value1, Long value2) {
      addCriterion("nanoTime not between", value1, value2, "nanoTime");
      return (Criteria) this;
    }

    public Criteria andCreatedIsNull() {
      addCriterion("created is null");
      return (Criteria) this;
    }

    public Criteria andCreatedIsNotNull() {
      addCriterion("created is not null");
      return (Criteria) this;
    }

    public Criteria andCreatedEqualTo(Date value) {
      addCriterion("created =", value, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedNotEqualTo(Date value) {
      addCriterion("created <>", value, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedGreaterThan(Date value) {
      addCriterion("created >", value, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedGreaterThanOrEqualTo(Date value) {
      addCriterion("created >=", value, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedLessThan(Date value) {
      addCriterion("created <", value, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedLessThanOrEqualTo(Date value) {
      addCriterion("created <=", value, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedIn(List<Date> values) {
      addCriterion("created in", values, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedNotIn(List<Date> values) {
      addCriterion("created not in", values, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedBetween(Date value1, Date value2) {
      addCriterion("created between", value1, value2, "created");
      return (Criteria) this;
    }

    public Criteria andCreatedNotBetween(Date value1, Date value2) {
      addCriterion("created not between", value1, value2, "created");
      return (Criteria) this;
    }

    public Criteria andAppKeyLikeInsensitive(String value) {
      addCriterion("upper(appKey) like", value.toUpperCase(), "appKey");
      return (Criteria) this;
    }

    public Criteria andUriLikeInsensitive(String value) {
      addCriterion("upper(uri) like", value.toUpperCase(), "uri");
      return (Criteria) this;
    }

    public Criteria andIpLikeInsensitive(String value) {
      addCriterion("upper(ip) like", value.toUpperCase(), "ip");
      return (Criteria) this;
    }

    public Criteria andHttpMethodLikeInsensitive(String value) {
      addCriterion("upper(httpMethod) like", value.toUpperCase(), "httpMethod");
      return (Criteria) this;
    }
  }

  public static class Criteria extends GeneratedCriteria {

    protected Criteria() {
      super();
    }
  }

  public static class Criterion {
    private String condition;

    private Object value;

    private Object secondValue;

    private boolean noValue;

    private boolean singleValue;

    private boolean betweenValue;

    private boolean listValue;

    private String typeHandler;

    public String getCondition() {
      return condition;
    }

    public Object getValue() {
      return value;
    }

    public Object getSecondValue() {
      return secondValue;
    }

    public boolean isNoValue() {
      return noValue;
    }

    public boolean isSingleValue() {
      return singleValue;
    }

    public boolean isBetweenValue() {
      return betweenValue;
    }

    public boolean isListValue() {
      return listValue;
    }

    public String getTypeHandler() {
      return typeHandler;
    }

    protected Criterion(String condition) {
      super();
      this.condition = condition;
      this.typeHandler = null;
      this.noValue = true;
    }

    protected Criterion(String condition, Object value, String typeHandler) {
      super();
      this.condition = condition;
      this.value = value;
      this.typeHandler = typeHandler;
      if (value instanceof List<?>) {
        this.listValue = true;
      } else {
        this.singleValue = true;
      }
    }

    protected Criterion(String condition, Object value) {
      this(condition, value, null);
    }

    protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
      super();
      this.condition = condition;
      this.value = value;
      this.secondValue = secondValue;
      this.typeHandler = typeHandler;
      this.betweenValue = true;
    }

    protected Criterion(String condition, Object value, Object secondValue) {
      this(condition, value, secondValue, null);
    }
  }
}
